package com.lzp.customview.wave

import android.os.Bundle
import com.base.BaseActivity
import com.lzp.customview.R
import kotlinx.android.synthetic.main.vertical_wave_activity.*

/**
 * @describe:
 * @Author: lixiaopeng
 * @Date: 12/8/20
 */
class VerticalWaveActivity : BaseActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.vertical_wave_activity)
    }

    override fun getData() {
        super.getData()
        if (isFinishing) {
            return
        }

        verticalWaveView.postDelayed({
            getData()
        }, 500)
        val list = ArrayList<Int>()
        for (index in 0..99) {
            list.add((Math.random() * 100).toInt())
        }
        verticalWaveView.freshData(list)
    }
}